home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Unix / top-v0_3 / Source / Makefile.X < prev    next >
Encoding:
Makefile  |  1995-03-02  |  3.7 KB  |  129 lines

  1. # Makefile for "top", a top 10 process display for Unix
  2. #
  3. # This makefile is for top, version 3
  4. #
  5. # Written by William LeFebvre, Argonne National Laboratory
  6. #        (formerly of Northwestern University and Rice University)
  7.  
  8. # DO NOT EDIT "Makefile"!!!!  Make changes to "Makefile.X" and rerun
  9. # Configure.
  10.  
  11. # Executables (these should be obvious):
  12.  
  13. SHELL   = %shell%
  14. CC      = %cc%
  15. AWK     = %awk%
  16. INSTALL = %install%
  17.  
  18. # installation information:
  19. #    OWNER    - name (or uid) for the installed executable's owner
  20. #    GROUP    - group name (or gid) for the installed executable's group
  21. #    MODE    - mode for the installed executable (should start with a 0)
  22. #    BINDIR    - directory where the executable should live
  23. #    MANDIR    - directory where the manual page should live
  24. #    MANEXT    - installed man pages end in .$(MANEXT)
  25. #    MANSTY    - "man" or "catman" depending on what's to be installed
  26. #    SIGNAL    - <signal.h> or <sys/signal.h>; the one with signal definitions
  27. #    TROFF    - most appropriate troff command
  28.  
  29. OWNER  = %owner%
  30. GROUP  = %group%
  31. MODE   = %mode%
  32. BINDIR = %bindir%
  33. MANDIR = %mandir%
  34. MANEXT = %manext%
  35. MANSTY = %mansty%
  36. SIGNAL = %signal%
  37.  
  38. # Values for the two defaults in "top":
  39. #    TOPN    - default number of processes to display
  40. #    DELAY    - default delay between updates
  41. #
  42. # set TOPN to -1 to indicate infinity (so that top will display as many
  43. # as the screen will hold).
  44.  
  45. TOPN = %topn%
  46. DELAY = %delay%
  47.  
  48. TARFILES = README INSTALL DISCLAIMER FAQ Changes Configure Porting \
  49.        Makefile.X Make.desc.X getans install \
  50.        top.c commands.c display.c screen.c username.c \
  51.        utils.c version.c getopt.c prime.c \
  52.        boolean.h display.h layout.h loadavg.h screen.h \
  53.        machine.h patchlevel.h top.h top.local.H os.h utils.h \
  54.        sigconv.awk top.X m-template metatop \
  55.        machine
  56. CFILES = top.c commands.c display.c screen.c username.c \
  57.      utils.c version.c getopt.c machine.c
  58. OBJS = top.o commands.o display.o screen.o username.o \
  59.        utils.o version.o getopt.o machine.o
  60.  
  61. CDEFS = %cdefs%
  62. LIBS = %libs%
  63.  
  64. CFLAGS = %cflgs% $(CDEFS)
  65. LINTFLAGS = -x $(CDEFS)
  66.  
  67. all: Makefile top.local.h top
  68.  
  69. Makefile: Makefile.X
  70.     @echo 'You need to run the script "Configure" before running "make".'
  71.     exit 10
  72.  
  73. top.local.h: top.local.H
  74.     @echo 'You need to run the script "Configure" before running "make".'
  75.     exit 10
  76.  
  77. top: $(OBJS)
  78.     rm -f top
  79.     $(CC) -o top $(OBJS) -ltermcap -lm $(LIBS)
  80.  
  81. lint: sigdesc.h
  82.     $(LINT) $(LINTFLAGS) $(CFILES)
  83.  
  84. # include file dependencies
  85. top.o: boolean.h display.h screen.h top.h top.local.h utils.h machine.h 
  86. commands.o: boolean.h sigdesc.h utils.h
  87. display.o: boolean.h display.h layout.h screen.h top.h top.local.h utils.h
  88. machine.o: top.h machine.h utils.h
  89. screen.o: boolean.h screen.h
  90. utils.o: top.h
  91. version.o: top.h patchlevel.h
  92. username.o: top.local.h utils.h
  93.  
  94. # automatically built include file
  95. sigdesc.h: sigconv.awk $(SIGNAL)
  96.     $(AWK) -f sigconv.awk $(SIGNAL) >sigdesc.h
  97.  
  98. tar:
  99.     rm -f top.tar machine/*.desc machine/*~
  100.     tar cvf top.tar $(TARFILES)
  101.  
  102. shar:
  103.     rm -f top.shar* machine/*.desc
  104.     makekit -ntop.shar. -t"Now read README and INSTALL, then run Configure" machine $(TARFILES)/*
  105.  
  106. clean:
  107.     rm -f *.o top core core.* sigdesc.h
  108.  
  109. veryclean: clean
  110.     rm -f Make.desc machine/*.desc .defaults top.tar SYNOPSIS Makefile top.local.h top.1 machine.c prime
  111.  
  112. install: top top.1 install-top install-$(MANSTY)
  113.  
  114. install-top:
  115.     $(INSTALL) -o $(OWNER) -m $(MODE) -g $(GROUP) top $(BINDIR)
  116.  
  117. install-man:
  118.     $(INSTALL) top.1 $(MANDIR)/top.$(MANEXT)
  119.  
  120. install-catman:
  121.     tbl top.1 | nroff -man > $(MANDIR)/top.$(MANEXT)
  122.  
  123. installmeta: top top.1
  124.     $(INSTALL) -o $(OWNER) -m 755 -g $(GROUP) metatop $(BINDIR)/top
  125.     @echo $(INSTALL) -o $(OWNER) -m $(MODE) -g $(GROUP) top $(BINDIR)/top-`uname -m`-`uname -r`
  126.     @$(INSTALL) -o $(OWNER) -m $(MODE) -g $(GROUP) \
  127.         top $(BINDIR)/top-`uname -m`-`uname -r`
  128.     $(INSTALL) top.1 $(MANDIR)/top.$(MANEXT)
  129.